/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * integratedPinsExtractor.java
 *
 * Created on Jun 17, 2010, 11:20:50 AM
 */
package preAnnotate;

import ResultEditor.Annotations.Article;
import ResultEditor.IO.PinFile;
import ResultEditor.Save.OutputToXML;
import java.util.Comparator;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Vector;
import javax.swing.JFileChooser;
import preAnnotate.format.Annotator;
import preAnnotate.writers.InternalToDictionary;
import preAnnotate.writers.outputAnnotations;

/**
 *
 * @author Kyle
 */
public class integratedPinsExtractor extends javax.swing.JPanel implements GUIInterface
{
    //<editor-fold defaultstate="collapsed" desc="Member Variables">
    //To keep track of the input files
    private ArrayList<PinFile> listElements = new ArrayList<PinFile>();
    private int totalProcess = 0;
    private int currentProcess = 0;

    //Used to store the number of files in process right before a major process is started.
    private int filesInProcess = 0;
    private Thread runningThread;
    private boolean stopThread = false;
    private static String[] readableFormats = new String[]
    {
        ".PINS"
    };
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Constructor">
    /** Creates new form integratedPinsExtractor */
    public integratedPinsExtractor()
    {
        initComponents();
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="GUIInterface Methods">
    /**
     * This method will append an output string to the output text pane
     * @param toOutput - the string to append.
     */
    public void output(String toOutput)
    {
        this.jTextPane1.setText(jTextPane1.getText() + toOutput);
    }
    public void setProgressPercentage(int value, String process)
    {
    }
    /**
     * Display an error message in a jOptionPane.s
     * @param error
     */
    public void displayMessage(String error)
    {
        jOptionPane1.showMessageDialog(this, error);
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Public Methods">
    /**
     * Set the progress bar based on how many files have been completed.
     *
     * @param filesCompleted - the number of files completed.
     */
    public void setProgress(int filesCompleted)
    {
        if (currentProcess == 0)
        {
            this.jProgressBar1.setValue((filesCompleted * (100 / (totalProcess + 1))) / filesInProcess);
        }
    }
    //</editor-fold>

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFileChooser1 = new javax.swing.JFileChooser();
        jOptionPane1 = new javax.swing.JOptionPane();
        buttonGroup1 = new javax.swing.ButtonGroup();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel60 = new javax.swing.JPanel();
        AllFilesInfo = new javax.swing.JPanel();
        jPanel62 = new javax.swing.JPanel();
        jPanel63 = new javax.swing.JPanel();
        jScrollPane12 = new javax.swing.JScrollPane();
        allFilesClassList = new javax.swing.JList();
        jPanel64 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jPanel65 = new javax.swing.JPanel();
        allFilesAddClass = new javax.swing.JButton();
        allFilesAddAllClasses = new javax.swing.JButton();
        jPanel66 = new javax.swing.JPanel();
        jPanel67 = new javax.swing.JPanel();
        jScrollPane13 = new javax.swing.JScrollPane();
        allFilesAnnotatorList = new javax.swing.JList();
        jPanel68 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        jPanel69 = new javax.swing.JPanel();
        allFilesAddAnnotator = new javax.swing.JButton();
        allFilesAddAnnotators = new javax.swing.JButton();
        jPanel70 = new javax.swing.JPanel();
        jPanel71 = new javax.swing.JPanel();
        jScrollPane14 = new javax.swing.JScrollPane();
        allFilesFilesList = new javax.swing.JList();
        jPanel72 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jPanel73 = new javax.swing.JPanel();
        allFilesAddFile = new javax.swing.JButton();
        allFilesAddFiles = new javax.swing.JButton();
        jPanel74 = new javax.swing.JPanel();
        selectedFileInfo = new javax.swing.JPanel();
        jPanel27 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jPanel29 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        selectedClassInfo = new javax.swing.JList();
        jPanel30 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jPanel31 = new javax.swing.JPanel();
        addSelectedClass = new javax.swing.JButton();
        addSelectedClasses = new javax.swing.JButton();
        jPanel32 = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        selectedAnnotatorInfo = new javax.swing.JList();
        jPanel34 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jPanel35 = new javax.swing.JPanel();
        addSelectedAnnotator = new javax.swing.JButton();
        addSelectedAnnotators = new javax.swing.JButton();
        jPanel36 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        selectedFiles = new javax.swing.JList();
        jPanel38 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jPanel39 = new javax.swing.JPanel();
        addSelectedFile = new javax.swing.JButton();
        addSelectedFiles = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        addFile = new javax.swing.JButton();
        removeFile = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel19 = new javax.swing.JPanel();
        classCheckBox = new javax.swing.JCheckBox();
        annotatorCheckBox = new javax.swing.JCheckBox();
        sourceFileCheckBox = new javax.swing.JCheckBox();
        jPanel5 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jPanel2 = new javax.swing.JPanel();
        jPanel42 = new javax.swing.JPanel();
        jPanel43 = new javax.swing.JPanel();
        jPanel44 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        filterClasses = new javax.swing.JList();
        jPanel46 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jPanel47 = new javax.swing.JPanel();
        jButton15 = new javax.swing.JButton();
        jButton16 = new javax.swing.JButton();
        jPanel48 = new javax.swing.JPanel();
        jPanel49 = new javax.swing.JPanel();
        jScrollPane9 = new javax.swing.JScrollPane();
        filterAnnotators = new javax.swing.JList();
        jPanel50 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jPanel51 = new javax.swing.JPanel();
        jButton17 = new javax.swing.JButton();
        jButton18 = new javax.swing.JButton();
        jPanel52 = new javax.swing.JPanel();
        jPanel53 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        filterFiles = new javax.swing.JList();
        jPanel54 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jPanel55 = new javax.swing.JPanel();
        jButton19 = new javax.swing.JButton();
        jButton20 = new javax.swing.JButton();
        jPanel56 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jPanel58 = new javax.swing.JPanel();
        jPanel41 = new javax.swing.JPanel();
        jPanel57 = new javax.swing.JPanel();
        annotationsOverwrite = new javax.swing.JCheckBox();
        browseAnnotations = new javax.swing.JButton();
        annotationsOutput = new javax.swing.JTextField();
        annotationsLabel = new javax.swing.JLabel();
        jPanel59 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        dictionaryOutput = new javax.swing.JTextField();
        jPanel61 = new javax.swing.JPanel();
        dictOverwrite = new javax.swing.JCheckBox();
        browseDictionary = new javax.swing.JButton();
        jPanel75 = new javax.swing.JPanel();
        xmlOutput = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jPanel76 = new javax.swing.JPanel();
        browseXML = new javax.swing.JButton();
        jPanel18 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        extract = new javax.swing.JButton();
        jPanel21 = new javax.swing.JPanel();
        cancelButton = new javax.swing.JButton();
        jProgressBar1 = new javax.swing.JProgressBar();
        jPanel11 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextPane1 = new javax.swing.JTextPane();
        jPanel16 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();

        setLayout(new java.awt.BorderLayout());

        jPanel1.setLayout(new java.awt.BorderLayout());

        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel4.setLayout(new java.awt.BorderLayout());

        jPanel9.setPreferredSize(new java.awt.Dimension(200, 200));
        jPanel9.setLayout(new java.awt.BorderLayout());

        jTabbedPane1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jPanel60.setLayout(new java.awt.BorderLayout());

        AllFilesInfo.setLayout(new java.awt.GridLayout(1, 0));

        jPanel62.setLayout(new java.awt.BorderLayout());

        jPanel63.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel63.setLayout(new java.awt.BorderLayout());

        jScrollPane12.setPreferredSize(new java.awt.Dimension(44, 80));

        allFilesClassList.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane12.setViewportView(allFilesClassList);

        jPanel63.add(jScrollPane12, java.awt.BorderLayout.CENTER);

        jPanel62.add(jPanel63, java.awt.BorderLayout.CENTER);

        jPanel64.setLayout(new java.awt.BorderLayout());

        jLabel14.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel14.setText("Classes:");
        jPanel64.add(jLabel14, java.awt.BorderLayout.CENTER);

        jPanel62.add(jPanel64, java.awt.BorderLayout.PAGE_START);

        jPanel65.setLayout(new java.awt.GridLayout(1, 0));

        allFilesAddClass.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        allFilesAddClass.setText("Add");
        allFilesAddClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                allFilesAddClassActionPerformed(evt);
            }
        });
        jPanel65.add(allFilesAddClass);

        allFilesAddAllClasses.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        allFilesAddAllClasses.setText("Add All");
        allFilesAddAllClasses.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                allFilesAddAllClassesActionPerformed(evt);
            }
        });
        jPanel65.add(allFilesAddAllClasses);

        jPanel62.add(jPanel65, java.awt.BorderLayout.PAGE_END);

        AllFilesInfo.add(jPanel62);

        jPanel66.setLayout(new java.awt.BorderLayout());

        jPanel67.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel67.setLayout(new java.awt.BorderLayout());

        jScrollPane13.setPreferredSize(new java.awt.Dimension(44, 80));

        allFilesAnnotatorList.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane13.setViewportView(allFilesAnnotatorList);

        jPanel67.add(jScrollPane13, java.awt.BorderLayout.CENTER);

        jPanel66.add(jPanel67, java.awt.BorderLayout.CENTER);

        jPanel68.setLayout(new java.awt.BorderLayout());

        jLabel15.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel15.setText("Annotators:");
        jPanel68.add(jLabel15, java.awt.BorderLayout.CENTER);

        jPanel66.add(jPanel68, java.awt.BorderLayout.PAGE_START);

        jPanel69.setLayout(new java.awt.GridLayout(1, 0));

        allFilesAddAnnotator.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        allFilesAddAnnotator.setText("Add");
        allFilesAddAnnotator.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                allFilesAddAnnotatorActionPerformed(evt);
            }
        });
        jPanel69.add(allFilesAddAnnotator);

        allFilesAddAnnotators.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        allFilesAddAnnotators.setText("Add All");
        allFilesAddAnnotators.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                allFilesAddAnnotatorsActionPerformed(evt);
            }
        });
        jPanel69.add(allFilesAddAnnotators);

        jPanel66.add(jPanel69, java.awt.BorderLayout.PAGE_END);

        AllFilesInfo.add(jPanel66);

        jPanel70.setLayout(new java.awt.BorderLayout());

        jPanel71.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel71.setLayout(new java.awt.BorderLayout());

        jScrollPane14.setPreferredSize(new java.awt.Dimension(44, 80));

        allFilesFilesList.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane14.setViewportView(allFilesFilesList);

        jPanel71.add(jScrollPane14, java.awt.BorderLayout.CENTER);

        jPanel70.add(jPanel71, java.awt.BorderLayout.CENTER);

        jPanel72.setLayout(new java.awt.BorderLayout());

        jLabel16.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel16.setText("Files:");
        jPanel72.add(jLabel16, java.awt.BorderLayout.CENTER);

        jPanel70.add(jPanel72, java.awt.BorderLayout.PAGE_START);

        jPanel73.setLayout(new java.awt.GridLayout(1, 0));

        allFilesAddFile.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        allFilesAddFile.setText("Add");
        allFilesAddFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                allFilesAddFileActionPerformed(evt);
            }
        });
        jPanel73.add(allFilesAddFile);

        allFilesAddFiles.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        allFilesAddFiles.setText("Add All");
        allFilesAddFiles.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                allFilesAddFilesActionPerformed(evt);
            }
        });
        jPanel73.add(allFilesAddFiles);

        jPanel70.add(jPanel73, java.awt.BorderLayout.PAGE_END);

        AllFilesInfo.add(jPanel70);

        jPanel60.add(AllFilesInfo, java.awt.BorderLayout.CENTER);

        jPanel74.setLayout(new java.awt.BorderLayout());
        jPanel60.add(jPanel74, java.awt.BorderLayout.PAGE_START);

        jTabbedPane1.addTab("All Files", jPanel60);

        selectedFileInfo.setPreferredSize(new java.awt.Dimension(600, 227));
        selectedFileInfo.setLayout(new java.awt.BorderLayout());

        jPanel27.setLayout(new java.awt.GridLayout(1, 0));

        jPanel28.setLayout(new java.awt.BorderLayout());

        jPanel29.setPreferredSize(new java.awt.Dimension(133, 190));
        jPanel29.setLayout(new java.awt.BorderLayout());

        jScrollPane5.setPreferredSize(new java.awt.Dimension(44, 160));

        selectedClassInfo.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane5.setViewportView(selectedClassInfo);

        jPanel29.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        jPanel28.add(jPanel29, java.awt.BorderLayout.CENTER);

        jPanel30.setLayout(new java.awt.BorderLayout());

        jLabel6.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel6.setText("Classes:");
        jPanel30.add(jLabel6, java.awt.BorderLayout.CENTER);

        jPanel28.add(jPanel30, java.awt.BorderLayout.PAGE_START);

        jPanel31.setLayout(new java.awt.GridLayout(1, 0));

        addSelectedClass.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addSelectedClass.setText("Add");
        addSelectedClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSelectedClassActionPerformed(evt);
            }
        });
        jPanel31.add(addSelectedClass);

        addSelectedClasses.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addSelectedClasses.setText("Add All");
        addSelectedClasses.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSelectedClassesActionPerformed(evt);
            }
        });
        jPanel31.add(addSelectedClasses);

        jPanel28.add(jPanel31, java.awt.BorderLayout.PAGE_END);

        jPanel27.add(jPanel28);

        jPanel32.setLayout(new java.awt.BorderLayout());

        jPanel33.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel33.setLayout(new java.awt.BorderLayout());

        jScrollPane6.setPreferredSize(new java.awt.Dimension(44, 80));

        selectedAnnotatorInfo.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane6.setViewportView(selectedAnnotatorInfo);

        jPanel33.add(jScrollPane6, java.awt.BorderLayout.CENTER);

        jPanel32.add(jPanel33, java.awt.BorderLayout.CENTER);

        jPanel34.setLayout(new java.awt.BorderLayout());

        jLabel7.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel7.setText("Annotators:");
        jPanel34.add(jLabel7, java.awt.BorderLayout.CENTER);

        jPanel32.add(jPanel34, java.awt.BorderLayout.PAGE_START);

        jPanel35.setLayout(new java.awt.GridLayout(1, 0));

        addSelectedAnnotator.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addSelectedAnnotator.setText("Add");
        addSelectedAnnotator.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSelectedAnnotatorActionPerformed(evt);
            }
        });
        jPanel35.add(addSelectedAnnotator);

        addSelectedAnnotators.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addSelectedAnnotators.setText("Add All");
        addSelectedAnnotators.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSelectedAnnotatorsActionPerformed(evt);
            }
        });
        jPanel35.add(addSelectedAnnotators);

        jPanel32.add(jPanel35, java.awt.BorderLayout.PAGE_END);

        jPanel27.add(jPanel32);

        jPanel36.setLayout(new java.awt.BorderLayout());

        jPanel37.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel37.setLayout(new java.awt.BorderLayout());

        jScrollPane7.setPreferredSize(new java.awt.Dimension(44, 80));

        selectedFiles.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane7.setViewportView(selectedFiles);

        jPanel37.add(jScrollPane7, java.awt.BorderLayout.CENTER);

        jPanel36.add(jPanel37, java.awt.BorderLayout.CENTER);

        jPanel38.setLayout(new java.awt.BorderLayout());

        jLabel8.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel8.setText("Files:");
        jPanel38.add(jLabel8, java.awt.BorderLayout.CENTER);

        jPanel36.add(jPanel38, java.awt.BorderLayout.PAGE_START);

        jPanel39.setLayout(new java.awt.GridLayout(1, 0));

        addSelectedFile.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addSelectedFile.setText("Add");
        addSelectedFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSelectedFileActionPerformed(evt);
            }
        });
        jPanel39.add(addSelectedFile);

        addSelectedFiles.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addSelectedFiles.setText("Add All");
        addSelectedFiles.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addSelectedFilesActionPerformed(evt);
            }
        });
        jPanel39.add(addSelectedFiles);

        jPanel36.add(jPanel39, java.awt.BorderLayout.PAGE_END);

        jPanel27.add(jPanel36);

        selectedFileInfo.add(jPanel27, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Selected File(s)", selectedFileInfo);

        jPanel9.add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel9, java.awt.BorderLayout.CENTER);

        jPanel10.setLayout(new java.awt.GridLayout(3, 1));

        jPanel7.setMaximumSize(new java.awt.Dimension(208, 34));
        jPanel7.setLayout(new java.awt.GridLayout(1, 0));

        addFile.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        addFile.setText("Add");
        addFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addFileActionPerformed(evt);
            }
        });
        jPanel7.add(addFile);

        removeFile.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        removeFile.setText("Remove");
        removeFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeFileActionPerformed(evt);
            }
        });
        jPanel7.add(removeFile);

        jPanel8.setLayout(new java.awt.BorderLayout());
        jPanel7.add(jPanel8);

        jPanel10.add(jPanel7);

        jPanel12.setLayout(new java.awt.BorderLayout());

        jPanel13.setBackground(new java.awt.Color(0, 51, 153));
        jPanel13.setLayout(new java.awt.GridLayout(1, 0, 5, 5));

        jLabel2.setFont(new java.awt.Font("Calibri", 1, 13));
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("FILTER OPTIONS");
        jPanel13.add(jLabel2);

        jPanel12.add(jPanel13, java.awt.BorderLayout.PAGE_START);

        jPanel10.add(jPanel12);

        jPanel19.setLayout(new java.awt.GridLayout(1, 0));

        classCheckBox.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        classCheckBox.setText("Filter By Class");
        classCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                classCheckBoxActionPerformed(evt);
            }
        });
        jPanel19.add(classCheckBox);

        annotatorCheckBox.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        annotatorCheckBox.setText("Filter By Annotator");
        annotatorCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                annotatorCheckBoxActionPerformed(evt);
            }
        });
        jPanel19.add(annotatorCheckBox);

        sourceFileCheckBox.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        sourceFileCheckBox.setText("Filter By Source File");
        sourceFileCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sourceFileCheckBoxActionPerformed(evt);
            }
        });
        jPanel19.add(sourceFileCheckBox);

        jPanel10.add(jPanel19);

        jPanel4.add(jPanel10, java.awt.BorderLayout.PAGE_START);

        jPanel3.add(jPanel4, java.awt.BorderLayout.PAGE_END);

        jPanel5.setBackground(new java.awt.Color(41, 119, 167));
        jPanel5.setLayout(new java.awt.BorderLayout());

        jLabel1.setFont(new java.awt.Font("Calibri", 1, 13));
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("SOURCE FILES");
        jPanel5.add(jLabel1, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);

        jPanel6.setPreferredSize(new java.awt.Dimension(399, 100));
        jPanel6.setLayout(new java.awt.BorderLayout());

        jScrollPane1.setPreferredSize(new java.awt.Dimension(260, 132));

        jList1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jList1ValueChanged(evt);
            }
        });
        jScrollPane1.setViewportView(jList1);

        jPanel6.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel6, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel3, java.awt.BorderLayout.CENTER);

        jSplitPane1.setLeftComponent(jPanel1);

        jPanel2.setLayout(new java.awt.BorderLayout());

        jPanel42.setLayout(new java.awt.BorderLayout());

        jPanel43.setLayout(new java.awt.GridLayout(1, 0));

        jPanel44.setLayout(new java.awt.BorderLayout());

        jPanel45.setPreferredSize(new java.awt.Dimension(133, 120));
        jPanel45.setRequestFocusEnabled(false);
        jPanel45.setLayout(new java.awt.BorderLayout());

        jScrollPane8.setPreferredSize(new java.awt.Dimension(44, 100));

        filterClasses.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane8.setViewportView(filterClasses);

        jPanel45.add(jScrollPane8, java.awt.BorderLayout.CENTER);

        jPanel44.add(jPanel45, java.awt.BorderLayout.CENTER);

        jPanel46.setLayout(new java.awt.BorderLayout());

        jLabel10.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel10.setText("Classes:");
        jPanel46.add(jLabel10, java.awt.BorderLayout.CENTER);

        jPanel44.add(jPanel46, java.awt.BorderLayout.PAGE_START);

        jPanel47.setLayout(new java.awt.GridLayout(1, 0));

        jButton15.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton15.setText("Remove");
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });
        jPanel47.add(jButton15);

        jButton16.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton16.setText("Remove All");
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });
        jPanel47.add(jButton16);

        jPanel44.add(jPanel47, java.awt.BorderLayout.PAGE_END);

        jPanel43.add(jPanel44);

        jPanel48.setLayout(new java.awt.BorderLayout());

        jPanel49.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel49.setLayout(new java.awt.BorderLayout());

        jScrollPane9.setPreferredSize(new java.awt.Dimension(44, 80));

        filterAnnotators.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane9.setViewportView(filterAnnotators);

        jPanel49.add(jScrollPane9, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel49, java.awt.BorderLayout.CENTER);

        jPanel50.setLayout(new java.awt.BorderLayout());

        jLabel11.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel11.setText("Annotators:");
        jPanel50.add(jLabel11, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel50, java.awt.BorderLayout.PAGE_START);

        jPanel51.setLayout(new java.awt.GridLayout(1, 0));

        jButton17.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton17.setText("Remove");
        jButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton17ActionPerformed(evt);
            }
        });
        jPanel51.add(jButton17);

        jButton18.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton18.setText("Remove All");
        jButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton18ActionPerformed(evt);
            }
        });
        jPanel51.add(jButton18);

        jPanel48.add(jPanel51, java.awt.BorderLayout.PAGE_END);

        jPanel43.add(jPanel48);

        jPanel52.setLayout(new java.awt.BorderLayout());

        jPanel53.setPreferredSize(new java.awt.Dimension(133, 80));
        jPanel53.setLayout(new java.awt.BorderLayout());

        filterFiles.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane3.setViewportView(filterFiles);

        jPanel53.add(jScrollPane3, java.awt.BorderLayout.CENTER);

        jPanel52.add(jPanel53, java.awt.BorderLayout.CENTER);

        jPanel54.setLayout(new java.awt.BorderLayout());

        jLabel12.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel12.setText("Files:");
        jPanel54.add(jLabel12, java.awt.BorderLayout.CENTER);

        jPanel52.add(jPanel54, java.awt.BorderLayout.PAGE_START);

        jPanel55.setLayout(new java.awt.GridLayout(1, 0));

        jButton19.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton19.setText("Remove");
        jButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton19ActionPerformed(evt);
            }
        });
        jPanel55.add(jButton19);

        jButton20.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton20.setText("Remove All");
        jButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton20ActionPerformed(evt);
            }
        });
        jPanel55.add(jButton20);

        jPanel52.add(jPanel55, java.awt.BorderLayout.PAGE_END);

        jPanel43.add(jPanel52);

        jPanel42.add(jPanel43, java.awt.BorderLayout.CENTER);

        jPanel56.setBackground(new java.awt.Color(41, 119, 167));
        jPanel56.setLayout(new java.awt.BorderLayout());

        jLabel13.setBackground(new java.awt.Color(41, 119, 167));
        jLabel13.setFont(new java.awt.Font("Calibri", 1, 13));
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("CURRENT FILTER OPTIONS");
        jPanel56.add(jLabel13, java.awt.BorderLayout.CENTER);

        jPanel42.add(jPanel56, java.awt.BorderLayout.PAGE_START);

        jPanel2.add(jPanel42, java.awt.BorderLayout.PAGE_START);

        jPanel14.setLayout(new java.awt.BorderLayout());

        jPanel58.setLayout(new java.awt.GridLayout(5, 0));

        jPanel41.setLayout(new java.awt.BorderLayout());

        jPanel57.setLayout(new java.awt.GridLayout(1, 0));

        annotationsOverwrite.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        annotationsOverwrite.setText("Overwrite");
        annotationsOverwrite.setToolTipText("<html>Select this to overwrite the selected file.<br> By default the file will be appended to.</html>");
        jPanel57.add(annotationsOverwrite);

        browseAnnotations.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        browseAnnotations.setText("Browse...");
        browseAnnotations.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                browseAnnotationsActionPerformed(evt);
            }
        });
        jPanel57.add(browseAnnotations);

        jPanel41.add(jPanel57, java.awt.BorderLayout.LINE_END);

        annotationsOutput.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jPanel41.add(annotationsOutput, java.awt.BorderLayout.CENTER);

        annotationsLabel.setFont(new java.awt.Font("Monospaced", 1, 11));
        annotationsLabel.setText("Annotations Output:");
        jPanel41.add(annotationsLabel, java.awt.BorderLayout.LINE_START);

        jPanel58.add(jPanel41);

        jPanel59.setLayout(new java.awt.BorderLayout());

        jLabel17.setFont(new java.awt.Font("Monospaced", 1, 11));
        jLabel17.setText(" Dictionary Output:");
        jPanel59.add(jLabel17, java.awt.BorderLayout.LINE_START);

        dictionaryOutput.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jPanel59.add(dictionaryOutput, java.awt.BorderLayout.CENTER);

        jPanel61.setLayout(new java.awt.GridLayout(1, 0));

        dictOverwrite.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        dictOverwrite.setText("Overwrite");
        dictOverwrite.setToolTipText("<html>Select this to overwrite the selected file.<br> By default the file will be appended to.</html>");
        jPanel61.add(dictOverwrite);

        browseDictionary.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        browseDictionary.setText("Browse...");
        browseDictionary.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                browseDictionaryActionPerformed(evt);
            }
        });
        jPanel61.add(browseDictionary);

        jPanel59.add(jPanel61, java.awt.BorderLayout.LINE_END);

        jPanel58.add(jPanel59);

        jPanel75.setLayout(new java.awt.BorderLayout());

        xmlOutput.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        xmlOutput.setToolTipText("<html>Enter the output directory for the XML files.<br> Any files in the directory that match files in<br> extracted pins files will be overwritten.</html>");
        jPanel75.add(xmlOutput, java.awt.BorderLayout.CENTER);

        jLabel19.setFont(new java.awt.Font("Monospaced", 1, 11));
        jLabel19.setText("        XML Output:");
        jPanel75.add(jLabel19, java.awt.BorderLayout.LINE_START);

        jPanel76.setLayout(new java.awt.GridLayout(1, 0));

        browseXML.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        browseXML.setText("Browse...");
        browseXML.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                browseXMLActionPerformed(evt);
            }
        });
        jPanel76.add(browseXML);

        jPanel75.add(jPanel76, java.awt.BorderLayout.LINE_END);

        jPanel58.add(jPanel75);

        jPanel18.setLayout(new java.awt.GridLayout(1, 3));

        jPanel20.setLayout(new java.awt.BorderLayout());

        jButton1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jButton1.setText("Clear All Options");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel20.add(jButton1, java.awt.BorderLayout.CENTER);

        jPanel18.add(jPanel20);

        extract.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        extract.setText("Extract");
        extract.setActionCommand("Extract");
        extract.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                extractActionPerformed(evt);
            }
        });
        jPanel18.add(extract);

        jPanel21.setLayout(new java.awt.BorderLayout());

        cancelButton.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        cancelButton.setText("Cancel");
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });
        jPanel21.add(cancelButton, java.awt.BorderLayout.CENTER);

        jPanel18.add(jPanel21);

        jPanel58.add(jPanel18);
        jPanel58.add(jProgressBar1);

        jPanel14.add(jPanel58, java.awt.BorderLayout.PAGE_START);

        jPanel11.setLayout(new java.awt.BorderLayout());
        jPanel14.add(jPanel11, java.awt.BorderLayout.PAGE_END);

        jPanel15.setLayout(new java.awt.BorderLayout());

        jTextPane1.setEditable(false);
        jTextPane1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jScrollPane2.setViewportView(jTextPane1);

        jPanel15.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        jPanel16.setBackground(new java.awt.Color(0, 51, 153));
        jPanel16.setLayout(new java.awt.BorderLayout());

        jLabel3.setFont(new java.awt.Font("Calibri", 1, 13));
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("EXTRACTION SUMMARY");
        jPanel16.add(jLabel3, java.awt.BorderLayout.CENTER);

        jPanel15.add(jPanel16, java.awt.BorderLayout.PAGE_START);

        jPanel14.add(jPanel15, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel14, java.awt.BorderLayout.CENTER);

        jSplitPane1.setRightComponent(jPanel2);

        add(jSplitPane1, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    //<editor-fold defaultstate="collapsed" desc="Event Handling">
    /**
     * This is called when a user clicks on the check box indicating they want to filter
     * by annotator.
     * @param evt
     */
    private void annotatorCheckBoxActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_annotatorCheckBoxActionPerformed
    {//GEN-HEADEREND:event_annotatorCheckBoxActionPerformed
        updateSelection();
        updateAllFilesList();
    }//GEN-LAST:event_annotatorCheckBoxActionPerformed
    /**
     * This is called when a user clicks on the button indicateding they want to add
     * a file to the list of input files.
     * @param evt
     */
    private void addFileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addFileActionPerformed
    {//GEN-HEADEREND:event_addFileActionPerformed
        openFileDialog();
        updateAllFilesList();

    }//GEN-LAST:event_addFileActionPerformed

    /**
     * Update selected information if the user selects a different file.
     * @param evt
     */
    private void jList1ValueChanged(javax.swing.event.ListSelectionEvent evt)//GEN-FIRST:event_jList1ValueChanged
    {//GEN-HEADEREND:event_jList1ValueChanged
        updateSelection();

    }//GEN-LAST:event_jList1ValueChanged

    /**
     * update selected information and all files informatino if the user indicates
     * that they want to filter by class.
     * @param evt
     */
    private void classCheckBoxActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_classCheckBoxActionPerformed
    {//GEN-HEADEREND:event_classCheckBoxActionPerformed
        updateSelection();
        updateAllFilesList();
    }//GEN-LAST:event_classCheckBoxActionPerformed
    /**
     * Called when a user clicks the checkbox indicating that they want to filter by
     * source file.
     * @param evt
     */
    private void sourceFileCheckBoxActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_sourceFileCheckBoxActionPerformed
    {//GEN-HEADEREND:event_sourceFileCheckBoxActionPerformed
        updateSelection();
        updateAllFilesList();
    }//GEN-LAST:event_sourceFileCheckBoxActionPerformed
    /**
     * Called when a user clicks the button indicating that they want to add selected classes from
     * the single file information tab.
     * @param evt
     */
    private void addSelectedClassActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addSelectedClassActionPerformed
    {//GEN-HEADEREND:event_addSelectedClassActionPerformed
        Object[] toAdd = selectedClassInfo.getSelectedValues();
        if (toAdd.length == 0)
        {
            displayMessage("Nothing Selected!");
        }
        addObjectsToList(toAdd, filterClasses);
    }//GEN-LAST:event_addSelectedClassActionPerformed
    /**
     * Called when a user clicks the button indicating that they want to add selcted annotators from
     * the single file information tab.
     * @param evt
     */
    private void addSelectedAnnotatorActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addSelectedAnnotatorActionPerformed
    {//GEN-HEADEREND:event_addSelectedAnnotatorActionPerformed
        Object[] toAdd = selectedAnnotatorInfo.getSelectedValues();
        if (toAdd.length == 0)
        {
            displayMessage("Nothing Selected!");
        }
        addObjectsToList(toAdd, filterAnnotators);
    }//GEN-LAST:event_addSelectedAnnotatorActionPerformed
    /**
     * Called when a user clicks the button indicating that they want to add selected files from
     * the single file information tab to the list of file filters.
     * @param evt
     */
    private void addSelectedFileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addSelectedFileActionPerformed
    {//GEN-HEADEREND:event_addSelectedFileActionPerformed
        Object[] toAdd = selectedFiles.getSelectedValues();
        if (toAdd.length == 0)
        {
            displayMessage("Nothing Selected!");
        }
        addObjectsToList(toAdd, filterFiles);
    }//GEN-LAST:event_addSelectedFileActionPerformed
    /**
     * Called when a user wants to add the selected classes from the all files information tab.
     * @param evt
     */
    private void allFilesAddClassActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_allFilesAddClassActionPerformed
    {//GEN-HEADEREND:event_allFilesAddClassActionPerformed
        Object[] toAdd = allFilesClassList.getSelectedValues();
        if (toAdd.length == 0)
        {
            displayMessage("Nothing Selected!");
        }
        addObjectsToList(toAdd, filterClasses);
    }//GEN-LAST:event_allFilesAddClassActionPerformed
    /**
     * Called when a user wants to add the selected annotator from the all files infomation tab.
     * @param evt
     */
    private void allFilesAddAnnotatorActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_allFilesAddAnnotatorActionPerformed
    {//GEN-HEADEREND:event_allFilesAddAnnotatorActionPerformed
        Object[] toAdd = allFilesAnnotatorList.getSelectedValues();
        if (toAdd.length == 0)
        {
            displayMessage("Nothing Selected!");
        }
        addObjectsToList(toAdd, filterAnnotators);
    }//GEN-LAST:event_allFilesAddAnnotatorActionPerformed
    /**
     * Called when a user clicks the button indicating that they want t add the selected annotator(s)
     * from the all files information tab to the file filters tab.
     * @param evt
     */
    private void allFilesAddFileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_allFilesAddFileActionPerformed
    {//GEN-HEADEREND:event_allFilesAddFileActionPerformed
        Object[] toAdd = allFilesFilesList.getSelectedValues();
        if (toAdd.length == 0)
        {
            displayMessage("Nothing Selected!");
        }
        addObjectsToList(toAdd, filterFiles);

    }//GEN-LAST:event_allFilesAddFileActionPerformed

    /**
     * Called when 'Add All' from the class viewer is clicked while viewing all
     * file information.
     *
     * @param evt
     */
    private void allFilesAddAllClassesActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_allFilesAddAllClassesActionPerformed
    {//GEN-HEADEREND:event_allFilesAddAllClassesActionPerformed
        // Get number of items in the list
        int size = allFilesClassList.getModel().getSize(); // 4

        // Get all item objects
        Object[] items = new Object[size];
        for (int i = 0; i < size; i++)
        {
            Object item = allFilesClassList.getModel().getElementAt(i);
            items[i] = item;
        }
        if (size == 0)
        {
            displayMessage("Nothing To Add!");
        }
        addObjectsToList(items, filterClasses);
    }//GEN-LAST:event_allFilesAddAllClassesActionPerformed

    private void addSelectedClassesActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addSelectedClassesActionPerformed
    {//GEN-HEADEREND:event_addSelectedClassesActionPerformed
        // Get number of items in the list
        int size = selectedClassInfo.getModel().getSize(); // 4

        // Get all item objects
        Object[] items = new Object[size];
        for (int i = 0; i < size; i++)
        {
            Object item = selectedClassInfo.getModel().getElementAt(i);
            items[i] = item;
        }
        if (size == 0)
        {
            displayMessage("Nothing To Add!");
        }
        addObjectsToList(items, filterClasses);
    }//GEN-LAST:event_addSelectedClassesActionPerformed

    private void addSelectedAnnotatorsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addSelectedAnnotatorsActionPerformed
    {//GEN-HEADEREND:event_addSelectedAnnotatorsActionPerformed
        // Get number of items in the list
        int size = selectedAnnotatorInfo.getModel().getSize(); // 4

        // Get all item objects
        Object[] items = new Object[size];
        for (int i = 0; i < size; i++)
        {
            Object item = selectedAnnotatorInfo.getModel().getElementAt(i);
            items[i] = item;
        }
        if (size == 0)
        {
            displayMessage("Nothing To Add!");
        }
        addObjectsToList(items, filterAnnotators);
    }//GEN-LAST:event_addSelectedAnnotatorsActionPerformed

    private void addSelectedFilesActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addSelectedFilesActionPerformed
    {//GEN-HEADEREND:event_addSelectedFilesActionPerformed
        // Get number of items in the list
        int size = selectedFiles.getModel().getSize(); // 4

        // Get all item objects
        Object[] items = new Object[size];
        for (int i = 0; i < size; i++)
        {
            Object item = selectedFiles.getModel().getElementAt(i);
            items[i] = item;
        }
        if (size == 0)
        {
            displayMessage("Nothing To Add!");
        }
        addObjectsToList(items, filterFiles);
    }//GEN-LAST:event_addSelectedFilesActionPerformed

    private void allFilesAddAnnotatorsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_allFilesAddAnnotatorsActionPerformed
    {//GEN-HEADEREND:event_allFilesAddAnnotatorsActionPerformed
        // Get number of items in the list
        int size = allFilesAnnotatorList.getModel().getSize(); // 4

        // Get all item objects
        Object[] items = new Object[size];
        for (int i = 0; i < size; i++)
        {
            Object item = allFilesAnnotatorList.getModel().getElementAt(i);
            items[i] = item;
        }
        if (size == 0)
        {
            displayMessage("Nothing To Add!");
        }
        addObjectsToList(items, filterAnnotators);
    }//GEN-LAST:event_allFilesAddAnnotatorsActionPerformed

    private void allFilesAddFilesActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_allFilesAddFilesActionPerformed
    {//GEN-HEADEREND:event_allFilesAddFilesActionPerformed
        // Get number of items in the list
        int size = allFilesFilesList.getModel().getSize(); // 4

        // Get all item objects
        Object[] items = new Object[size];
        for (int i = 0; i < size; i++)
        {
            Object item = allFilesFilesList.getModel().getElementAt(i);
            items[i] = item;
        }
        if (size == 0)
        {
            displayMessage("Nothing To Add!");
        }
        addObjectsToList(items, filterFiles);
    }//GEN-LAST:event_allFilesAddFilesActionPerformed

    private void jButton15ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton15ActionPerformed
    {//GEN-HEADEREND:event_jButton15ActionPerformed
        removeSelectedIndices(filterClasses, filterClasses.getMinSelectionIndex(), filterClasses.getMaxSelectionIndex());
    }//GEN-LAST:event_jButton15ActionPerformed

    private void jButton17ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton17ActionPerformed
    {//GEN-HEADEREND:event_jButton17ActionPerformed
        removeSelectedIndices(filterAnnotators, filterAnnotators.getMinSelectionIndex(), filterAnnotators.getMaxSelectionIndex());
    }//GEN-LAST:event_jButton17ActionPerformed

    private void jButton19ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton19ActionPerformed
    {//GEN-HEADEREND:event_jButton19ActionPerformed
        removeSelectedIndices(filterFiles, filterFiles.getMinSelectionIndex(), filterFiles.getMaxSelectionIndex());
    }//GEN-LAST:event_jButton19ActionPerformed

    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton16ActionPerformed
    {//GEN-HEADEREND:event_jButton16ActionPerformed
        removeSelectedIndices(filterClasses, 0, filterClasses.getModel().getSize() - 1);
    }//GEN-LAST:event_jButton16ActionPerformed

    private void jButton18ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton18ActionPerformed
    {//GEN-HEADEREND:event_jButton18ActionPerformed
        removeSelectedIndices(filterAnnotators, 0, filterAnnotators.getModel().getSize() - 1);
    }//GEN-LAST:event_jButton18ActionPerformed

    private void jButton20ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton20ActionPerformed
    {//GEN-HEADEREND:event_jButton20ActionPerformed
        removeSelectedIndices(filterFiles, 0, filterFiles.getModel().getSize() - 1);
    }//GEN-LAST:event_jButton20ActionPerformed

    private void removeFileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_removeFileActionPerformed
    {//GEN-HEADEREND:event_removeFileActionPerformed
        eraseSelection();
    }//GEN-LAST:event_removeFileActionPerformed

    private void extractActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_extractActionPerformed
    {//GEN-HEADEREND:event_extractActionPerformed
        if (checkReady())
        {
            if (runningThread == null || !runningThread.isAlive())
            {
                runningThread = new Thread()
                {

                    @Override
                    public void run()
                    {
                        generateResults();
                    }
                };
                runningThread.start();
            }
            else
            {
                displayMessage("Process Already Running!");
            }
        }
    }//GEN-LAST:event_extractActionPerformed

    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_cancelButtonActionPerformed
    {//GEN-HEADEREND:event_cancelButtonActionPerformed
        if (runningThread != null && runningThread.isAlive())
        {
            stopThread = true;
        }
    }//GEN-LAST:event_cancelButtonActionPerformed

    /**
     * Called when the user wants to clear all options.
     * @param evt
     */
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton1ActionPerformed
    {//GEN-HEADEREND:event_jButton1ActionPerformed
        //Set everything back to it's intial state.
        Vector v = new Vector();
        filterClasses.setListData(v);
        filterAnnotators.setListData(v);
        this.filterFiles.setListData(v);
        this.allFilesClassList.setListData(v);
        this.allFilesAnnotatorList.setListData(v);
        this.allFilesFilesList.setListData(v);
        this.listElements = new ArrayList<PinFile>();
        this.jList1.setListData(v);
        this.selectedClassInfo.setListData(v);
        this.selectedAnnotatorInfo.setListData(v);
        this.selectedFiles.setListData(v);
        this.dictionaryOutput.setText("");
        this.xmlOutput.setText("");
        this.annotationsOutput.setText("");
        this.dictOverwrite.setSelected(false);
        this.annotationsOverwrite.setSelected(false);
        this.classCheckBox.setSelected(false);
        this.annotatorCheckBox.setSelected(false);
        this.sourceFileCheckBox.setSelected(false);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void browseAnnotationsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_browseAnnotationsActionPerformed
    {//GEN-HEADEREND:event_browseAnnotationsActionPerformed
        this.openSingleFileDialog(annotationsOutput, new String[]{".annotations"}, "Annotations files");
    }//GEN-LAST:event_browseAnnotationsActionPerformed

    private void browseXMLActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_browseXMLActionPerformed
    {//GEN-HEADEREND:event_browseXMLActionPerformed
        this.openSingleFileDialog(xmlOutput, new String[]{".xml"}, "XML Files");
    }//GEN-LAST:event_browseXMLActionPerformed

    private void browseDictionaryActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_browseDictionaryActionPerformed
    {//GEN-HEADEREND:event_browseDictionaryActionPerformed
        this.openSingleFileDialog(dictionaryOutput, new String[]{".preannotate"},"Dictionary Files");
    }//GEN-LAST:event_browseDictionaryActionPerformed
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Private Methods">
    private void setProgress()
    {
        jProgressBar1.setValue(currentProcess * 100 / totalProcess);
    }
    /**
     * Update all of the class, annotator, and fileNames in the three lists for
     * all files information.
     */
    private void updateAllFilesList()
    {
        //Init
        Vector<String> allClasses = new Vector<String>();
        Vector<Annotator> allAnnotators = new Vector<Annotator>();
        Vector<String> allNames = new Vector<String>();

        //Loop through all source files and aggregate the data.
        for (PinFile file : listElements)
        {
            //If user is filtering by class then display the classes in all files
            if (classCheckBox.isSelected())
            {
                //Get all unique classes from all files.
                for (String aClass : file.getAllClasses())
                {
                    boolean unique = true;
                    for (String existingClass : allClasses)
                    {
                        if (existingClass.equals(aClass))
                        {
                            unique = false;
                        }
                    }
                    if (unique)
                    {
                        allClasses.add(aClass);
                    }
                }
                Collections.sort(allClasses);
            }
            //If user is filtering by annotator then display annotators
            if (annotatorCheckBox.isSelected())
            {
                //Get all unique annotators from all files.
                for (Annotator anAnnotator : file.getAllAnnotators())
                {
                    boolean unique = true;
                    for (Annotator existing : allAnnotators)
                    {
                        if (existing.equals(anAnnotator))
                        {
                            unique = false;
                        }
                    }
                    if (unique)
                    {
                        allAnnotators.add(anAnnotator);
                    }
                }
                //Sort using the specified comparator
                Collections.sort(allAnnotators, new Comparator()
                {
                    public int compare(Object first, Object second)
                    {
                        return first.toString().compareTo(second.toString());
                    }
                });
            }
            //If the user is filtering by source files then display source files.
            if (sourceFileCheckBox.isSelected())
            {
                //Get all unique source fileNames.
                for (String aName : file.getAllFileNames())
                {
                    boolean unique = true;
                    for (String existing : allNames)
                    {
                        if (existing.equals(aName))
                        {
                            unique = false;
                        }
                    }
                    if (unique)
                    {
                        allNames.add(aName);
                    }
                }
                Collections.sort(allNames);
            }

        }
        //Display all results.
        allFilesClassList.setListData(allClasses);
        allFilesAnnotatorList.setListData(allAnnotators);
        allFilesFilesList.setListData(allNames);
    }
    /**
     * This method will check to see if the the user has entered the required information to perform
     * an extraction.
     * @return
     */
    private boolean checkReady()
    {
        //Check for output destinations
        if (annotationsOutput.getText().equals("") && dictionaryOutput.getText().equals("") && xmlOutput.getText().equals(""))
        {
            displayMessage("You don't have any output destinations!");
            return false;
        }
        //Check to make sure there is a class to filter by if the class box is selected.
        else if (classCheckBox.isSelected() && filterClasses.getModel().getSize() == 0)
        {
            displayMessage("You didn't choose any class filters!");
            return false;
        }
        //Make sure an annotator is checked
        else if (annotatorCheckBox.isSelected() && filterAnnotators.getModel().getSize() == 0)
        {
            displayMessage("You didn't choose any annotator filters!");
            return false;
        }
        //Make sure there are some source files
        else if (sourceFileCheckBox.isSelected() && filterFiles.getModel().getSize() == 0)
        {
            displayMessage("You didn't chose any file filters!");
            return false;
        }
        return true;

    }

    /**
     * This method will do the actual extraction.
     */
    private void generateResults()
    {
        //Clear Output Text
        this.jTextPane1.setText("");

        //Extract needed information for extraction
        String XMLOutput = xmlOutput.getText();
        String annotationsOutputString = annotationsOutput.getText();
        String dictionaryOutputString = dictionaryOutput.getText();
        ArrayList<String> chosenClasses = null;
        ArrayList<Annotator> chosenAnnotators = null;
        ArrayList<String> chosenFiles = null;

        //Extract class filters.
        if (classCheckBox.isSelected())
        {
            chosenClasses = new ArrayList<String>();
            // Get number of items in the list
            int size = filterClasses.getModel().getSize(); // 4

            // Get all item objects
            for (int i = 0; i < size; i++)
            {
                chosenClasses.add((String) filterClasses.getModel().getElementAt(i));
            }
        }
        //Extract annotator filters.
        if (annotatorCheckBox.isSelected())
        {
            chosenAnnotators = new ArrayList<Annotator>();
            // Get number of items in the list
            int size = filterAnnotators.getModel().getSize(); // 4

            // Get all item objects
            for (int i = 0; i < size; i++)
            {
                chosenAnnotators.add((Annotator) filterAnnotators.getModel().getElementAt(i));
            }
        }
        //Extract source file filters.
        if (sourceFileCheckBox.isSelected())
        {
            chosenFiles = new ArrayList<String>();
            // Get number of items in the list
            int size = filterFiles.getModel().getSize(); // 4

            // Get all item objects
            for (int i = 0; i < size; i++)
            {
                chosenFiles.add((String) filterFiles.getModel().getElementAt(i));
            }
        }
        //Extract the annotations using the given filters
        filesInProcess = listElements.size();
        currentProcess = 0;
        totalProcess = 0;
        //Count all of the processes.. for progress bar.
        if (!XMLOutput.equals(""))
        {
            totalProcess++;
        }
        if (!annotationsOutputString.equals(""))
        {
            totalProcess++;
        }
        if (!dictionaryOutputString.equals(""))
        {
            totalProcess++;
        }
        ArrayList<Article> before = new ArrayList<Article>();
        ArrayList<Article> allAnnotations = new ArrayList<Article>();
        for(PinFile file: listElements)
        {
            before.addAll(file.articles);
        }
        allAnnotations = articleFilters.filter(before, chosenFiles, chosenAnnotators, chosenClasses);
        
        //If there is a set xmloutput directory output xml files.
        output("OUTPUT SUMMARY");
        if (!XMLOutput.equals(""))
        {
            output("\nXML Extraction Details:\n");
            currentProcess++;
            for(Article article : allAnnotations)
            {
                OutputToXML outputXML = new OutputToXML( article.filename,XMLOutput, article);
                boolean worked = outputXML.write();
                //If it wrote correctly then output that
                if(worked)
                {
                    output(article.filename + " written successfully!\n");
                }
                //Also output if it did not work
                else
                {
                    output(article.filename + " failed to write!\n");
                }
                //Check to see if this thread should be stopped.
                if (stopThread == true)
                {
                    killThread();
                    return;
                }
            }
            setProgress();
        }

        //If there is a set annotations output file then output annotations
        if (!annotationsOutputString.equals(""))
        {
            output("\nAnnotations Extraction Details: \n");
            currentProcess++;
            outputAnnotations outputter = new outputAnnotations(allAnnotations, annotationsOutputString, annotationsOverwrite.isSelected());
            output(outputter.write(chosenFiles, chosenAnnotators, chosenClasses));
            setProgress();
        }
        if (stopThread == true)
        {
            killThread();
            return;
        }

        //If there is a set dictionary output file then output a dictionary.
        if (!dictionaryOutputString.equals(""))
        {
            output("\nDictionary Extraction Details:\n");
            currentProcess++;
            InternalToDictionary outputter = new InternalToDictionary(allAnnotations, chosenClasses, chosenAnnotators, dictionaryOutputString);
            output(outputter.addToDictionary(dictOverwrite.isSelected()));
            setProgress();
        }
        output("OUTPUT COMPLETE!\n");
        setProgress(0);
    }

    private void killThread()
    {
        stopThread = false;
        setProgress(0);
    }

    /**
     * This method will add objects to a JList
     * @param toAdd - the objects to add to a list.
     * @param addTo - the jList to add the objects to.
     */
    private void addObjectsToList(Object[] toAdd, javax.swing.JList addTo)
    {

        for (Object adder : toAdd)
        {
            addObjectToList(adder, addTo);
        }

    }

    /**
     * This method will remove objects from a JList.
     * @param removeFrom - the JList to remove objects from.
     * @param start - the index of the first object to be removed.
     * @param stop - the index of the last index to be removed.
     */
    private void removeSelectedIndices(javax.swing.JList removeFrom, int start, int stop)
    {

        Vector<Object> items = new Vector<Object>();
        // Get number of items in the list
        int size = removeFrom.getModel().getSize();
        if (size == 0)
        {
            displayMessage("Nothing to Remove!");
        }

        // Get all item objects
        for (int i = 0; i < size; i++)
        {
            items.add(removeFrom.getModel().getElementAt(i));
        }
        //Make sure something is selected
        if (start != -1)
        {
            //Remove as many items as are selected
            for (int i = start; i <= stop; i++)
            {
                items.remove(start);
            }
        }
        removeFrom.setListData(items);
    }

    /**
     * This method will add an object to a JList
     * @param toAdd - the object to add to the list
     * @param addTo - the List to add to.
     */
    private void addObjectToList(Object toAdd, javax.swing.JList addTo)
    {
        // Get number of items in the list
        int size = addTo.getModel().getSize(); // 4

        // Get all item objects
        boolean unique = true;
        Vector<Object> items = new Vector<Object>();
        for (int i = 0; i < size; i++)
        {
            Object item = addTo.getModel().getElementAt(i);
            items.add(item);
            if (item.equals(toAdd))
            {
                unique = false;
            }
        }
        if (unique)
        {
            items.add(toAdd);
        }
        addTo.setListData(items);

    }

    /**
     * This method will update the information being displayed for an individual file and should
     * be called whenever the selected list object changes.
     */
    private void updateSelection()
    {
        //To hold results
        Vector<String> forList2 = new Vector<String>();
        Vector<Annotator> forList3 = new Vector<Annotator>();
        Vector<String> forList4 = new Vector<String>();
        //Make sure an object is selected
        if (jList1.getSelectedIndex() != -1)
        {
            //Get the index of the selected object.
            int index = jList1.getSelectedIndex();
            //Extract class information
            if (classCheckBox.isSelected())
            {
                HashSet<String> allClasses = listElements.get(index).getAllClasses();
                forList2.addAll(allClasses);
                Collections.sort(forList2);

            }
            //Extract annotator information
            if (annotatorCheckBox.isSelected())
            {
                HashSet<Annotator> allAnnotators = listElements.get(index).getAllAnnotators();
                forList3.addAll(allAnnotators);
                Collections.sort(forList3, new Comparator()
                {

                    public int compare(Object first, Object second)
                    {
                        return first.toString().compareTo(second.toString());
                    }
                });
            }
            //extract source file information
            if (sourceFileCheckBox.isSelected())
            {
                HashSet<String> allNames = listElements.get(index).getAllFileNames();

                forList4.addAll(allNames);
                Collections.sort(forList4);
            }
        }
        //Display all information
        selectedClassInfo.setListData(forList2);
        selectedAnnotatorInfo.setListData(forList3);
        selectedFiles.setListData(forList4);
    }

    /**
     * This method will erase the selected files from the main files list.
     */
    private void eraseSelection()
    {
        int start = jList1.getMinSelectionIndex();
        //System.out.println("Start: " + start);
        int stop = jList1.getMaxSelectionIndex();
        //System.out.println("Stop: " + stop);
        if (start != -1)
        {
            for (int i = start; i <= stop; i++)
            {
                listElements.remove(start);
            }
        }
        reDrawList();
    }

    /**
     * This method will reDraw the list elements for the main files list and should be called whenever the
     * member variable listElements is changed.
     */
    private void reDrawList()
    {
        PinFile[] elements = new PinFile[listElements.size()];
        for (int i = 0; i < listElements.size(); i++)
        {
            elements[i] = listElements.get(i);
        }
        jList1.setListData(elements);
    }

    /**
     * This will allow a user to select a single file.
     * @param toAdd - the text field to add the selected file name to.
     */
    private void openSingleFileDialog(javax.swing.JTextField toAdd, String[] allowed, String description)
    {
        //Clear out previous file selections
        jFileChooser1.resetChoosableFileFilters();

        jFileChooser1.setSelectedFiles(new File[0]);
        jFileChooser1.setMultiSelectionEnabled(false);

        // Add file filter
        jFileChooser1.addChoosableFileFilter(new ExtensionFileFilter(
                allowed,
                description));

        // Turn off 'All Files' capability of file chooser,
        // so only our custom filter is used.
        jFileChooser1.setAcceptAllFileFilterUsed(false);

        int result = jFileChooser1.showSaveDialog(this);

        if (jFileChooser1.getSelectedFile() != null && result == JFileChooser.APPROVE_OPTION)
        {
            toAdd.setText(jFileChooser1.getSelectedFile().getAbsolutePath());
        }

    }

    /**
     * This method will allow the user to select multiple files that will be added
     * to the main list of files.
     */
    private void openFileDialog()
    {
        //Clear out previous dialogs
        jFileChooser1.setSelectedFiles(new File[0]);

        //Clear out previous file selections
        jFileChooser1.resetChoosableFileFilters();

        //Allow multiple file selection.
        jFileChooser1.setMultiSelectionEnabled(true);

        // Add second file filter
        jFileChooser1.addChoosableFileFilter(new ExtensionFileFilter(
                new String[]
                {
                    ".pins"
                },
                "PINS Files "));

        // Turn off 'All Files' capability of file chooser,
        // so only our custom filter is used.
        jFileChooser1.setAcceptAllFileFilterUsed(false);

        //Store the result so we know if the user selected ok or not.
        int result = jFileChooser1.showOpenDialog(this);

        //If the user did not approve the selection then just return.
        if (result != JFileChooser.APPROVE_OPTION)
        {
            return;
        }
        final File[] selFiles = jFileChooser1.getSelectedFiles();

        //Make sure there isn't another thread going
        if (runningThread == null || !runningThread.isAlive())
        {
            runningThread = new Thread()
            {

                @Override
                public void run()
                {
                    preProcess(selFiles);
                }
            };
            runningThread.start();
        }
        //If another thread is running then don't start another thread.
        else
        {
            displayMessage("Process Already Running!");
        }

    }

    private void preProcess(File[] selFiles)
    {
        currentProcess = 0;
        totalProcess = 0;
        filesInProcess = selFiles.length;
        int currentFile = 0;

        //Process each file
        for (File selected : selFiles)
        {
            //Check to see if this thread should stop.
            if (stopThread == true)
            {
                killThread();
                break;
            }
            currentFile++;
            String name = selected.getAbsolutePath();
            //Extract the extension
            String extension = name.substring(name.lastIndexOf("."));

            //Assume we can't read it
            boolean canRead = false;

            //If it matches a file extension of our readable formats then we can read it
            // so set canRead to true.
            for (String readable : readableFormats)
            {
                if (readable.toLowerCase().equals(extension.toLowerCase()))
                {
                    canRead = true;
                    break;
                }
            }

            //If we can read it then process all of the annotators classes, and fileNames so they
            //are ready for use and add it to the list of files.
            if (canRead)
            {
                PinFile toAdd = new PinFile(selected);
                toAdd.startParsing(false);
                toAdd.getAllAnnotators();
                toAdd.getAllClasses();
                toAdd.getAllFileNames();
                listElements.add(toAdd);
                setProgress(currentFile);
            }
        }
        //Redraw main list of files.
        reDrawList();
        setProgress(0);
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="GUI Components">
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel AllFilesInfo;
    private javax.swing.JButton addFile;
    private javax.swing.JButton addSelectedAnnotator;
    private javax.swing.JButton addSelectedAnnotators;
    private javax.swing.JButton addSelectedClass;
    private javax.swing.JButton addSelectedClasses;
    private javax.swing.JButton addSelectedFile;
    private javax.swing.JButton addSelectedFiles;
    private javax.swing.JButton allFilesAddAllClasses;
    private javax.swing.JButton allFilesAddAnnotator;
    private javax.swing.JButton allFilesAddAnnotators;
    private javax.swing.JButton allFilesAddClass;
    private javax.swing.JButton allFilesAddFile;
    private javax.swing.JButton allFilesAddFiles;
    private javax.swing.JList allFilesAnnotatorList;
    private javax.swing.JList allFilesClassList;
    private javax.swing.JList allFilesFilesList;
    private javax.swing.JLabel annotationsLabel;
    private javax.swing.JTextField annotationsOutput;
    private javax.swing.JCheckBox annotationsOverwrite;
    private javax.swing.JCheckBox annotatorCheckBox;
    private javax.swing.JButton browseAnnotations;
    private javax.swing.JButton browseDictionary;
    private javax.swing.JButton browseXML;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton cancelButton;
    private javax.swing.JCheckBox classCheckBox;
    private javax.swing.JCheckBox dictOverwrite;
    private javax.swing.JTextField dictionaryOutput;
    private javax.swing.JButton extract;
    private javax.swing.JList filterAnnotators;
    private javax.swing.JList filterClasses;
    private javax.swing.JList filterFiles;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton20;
    private javax.swing.JFileChooser jFileChooser1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JList jList1;
    private javax.swing.JOptionPane jOptionPane1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel56;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel61;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel67;
    private javax.swing.JPanel jPanel68;
    private javax.swing.JPanel jPanel69;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel70;
    private javax.swing.JPanel jPanel71;
    private javax.swing.JPanel jPanel72;
    private javax.swing.JPanel jPanel73;
    private javax.swing.JPanel jPanel74;
    private javax.swing.JPanel jPanel75;
    private javax.swing.JPanel jPanel76;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextPane jTextPane1;
    private javax.swing.JButton removeFile;
    private javax.swing.JList selectedAnnotatorInfo;
    private javax.swing.JList selectedClassInfo;
    private javax.swing.JPanel selectedFileInfo;
    private javax.swing.JList selectedFiles;
    private javax.swing.JCheckBox sourceFileCheckBox;
    private javax.swing.JTextField xmlOutput;
    // End of variables declaration//GEN-END:variables
    //</editor-fold>
}
